package com.insigma.business.qrcode.soldier.entity;

import com.google.common.collect.Sets;
import lombok.Data;

import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.HashSet;


@Data
public class MedicalInsuranceConsumptionEntity implements Serializable {
    
    private Integer id;

    
    private BigDecimal ptmzzfn;

    
    private BigDecimal ylzfk;

    
    private BigDecimal gdbzjeg;

    
    private BigDecimal gdbzjeh;

    
    private BigDecimal gdbzjei;

    
    private BigDecimal gdbzjem;

    
    private String pName;

    
    private String sino;

    
    private BigDecimal ptmzzfa;

    
    private BigDecimal ptmzzfb;

    
    private BigDecimal ptmzzfc;

    
    private BigDecimal ptmzzfd;

    
    private BigDecimal ptmzzfe;

    
    private BigDecimal ptmzzff;

    
    private String idNo;

    
    private BigDecimal ptmzzfl;

    
    private LocalDateTime startTime;

    
    private LocalDateTime endTime;

    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        MedicalInsuranceConsumptionEntity that = (MedicalInsuranceConsumptionEntity) o;

        if (ptmzzfn != null ? !ptmzzfn.equals(that.ptmzzfn) : that.ptmzzfn != null) return false;
        if (ylzfk != null ? !ylzfk.equals(that.ylzfk) : that.ylzfk != null) return false;
        if (gdbzjeg != null ? !gdbzjeg.equals(that.gdbzjeg) : that.gdbzjeg != null) return false;
        if (gdbzjeh != null ? !gdbzjeh.equals(that.gdbzjeh) : that.gdbzjeh != null) return false;
        if (gdbzjei != null ? !gdbzjei.equals(that.gdbzjei) : that.gdbzjei != null) return false;
        if (gdbzjem != null ? !gdbzjem.equals(that.gdbzjem) : that.gdbzjem != null) return false;
        if (pName != null ? !pName.equals(that.pName) : that.pName != null) return false;
        if (sino != null ? !sino.equals(that.sino) : that.sino != null) return false;
        if (ptmzzfa != null ? !ptmzzfa.equals(that.ptmzzfa) : that.ptmzzfa != null) return false;
        if (ptmzzfb != null ? !ptmzzfb.equals(that.ptmzzfb) : that.ptmzzfb != null) return false;
        if (ptmzzfc != null ? !ptmzzfc.equals(that.ptmzzfc) : that.ptmzzfc != null) return false;
        if (ptmzzfd != null ? !ptmzzfd.equals(that.ptmzzfd) : that.ptmzzfd != null) return false;
        if (ptmzzfe != null ? !ptmzzfe.equals(that.ptmzzfe) : that.ptmzzfe != null) return false;
        if (ptmzzff != null ? !ptmzzff.equals(that.ptmzzff) : that.ptmzzff != null) return false;
        if (idNo != null ? !idNo.equals(that.idNo) : that.idNo != null) return false;
        return ptmzzfl != null ? ptmzzfl.equals(that.ptmzzfl) : that.ptmzzfl == null;
    }

    @Override
    public int hashCode() {
        int result = ptmzzfn != null ? ptmzzfn.hashCode() : 0;
        result = 31 * result + (ylzfk != null ? ylzfk.hashCode() : 0);
        result = 31 * result + (gdbzjeg != null ? gdbzjeg.hashCode() : 0);
        result = 31 * result + (gdbzjeh != null ? gdbzjeh.hashCode() : 0);
        result = 31 * result + (gdbzjei != null ? gdbzjei.hashCode() : 0);
        result = 31 * result + (gdbzjem != null ? gdbzjem.hashCode() : 0);
        result = 31 * result + (pName != null ? pName.hashCode() : 0);
        result = 31 * result + (sino != null ? sino.hashCode() : 0);
        result = 31 * result + (ptmzzfa != null ? ptmzzfa.hashCode() : 0);
        result = 31 * result + (ptmzzfb != null ? ptmzzfb.hashCode() : 0);
        result = 31 * result + (ptmzzfc != null ? ptmzzfc.hashCode() : 0);
        result = 31 * result + (ptmzzfd != null ? ptmzzfd.hashCode() : 0);
        result = 31 * result + (ptmzzfe != null ? ptmzzfe.hashCode() : 0);
        result = 31 * result + (ptmzzff != null ? ptmzzff.hashCode() : 0);
        result = 31 * result + (idNo != null ? idNo.hashCode() : 0);
        result = 31 * result + (ptmzzfl != null ? ptmzzfl.hashCode() : 0);
        return result;
    }

    public String shortInfo() {
        return String.format("医疗费总额：%s", ylzfk);
    }

    public static void main(String[] args) {
        MedicalInsuranceConsumptionEntity e1 = new MedicalInsuranceConsumptionEntity();
        e1.setPtmzzfa(new BigDecimal(111));
        MedicalInsuranceConsumptionEntity e2 = new MedicalInsuranceConsumptionEntity();
        e2.setPtmzzfa(new BigDecimal(222));
        MedicalInsuranceConsumptionEntity e3 = new MedicalInsuranceConsumptionEntity();
        e3.setPtmzzfa(new BigDecimal(333));
        MedicalInsuranceConsumptionEntity e4 = new MedicalInsuranceConsumptionEntity();
        e4.setPtmzzfa(new BigDecimal(333));
        e4.setStartTime(LocalDateTime.now());
        MedicalInsuranceConsumptionEntity e5 = new MedicalInsuranceConsumptionEntity();
        e5.setPName("aaa");
        HashSet<MedicalInsuranceConsumptionEntity> medicalInsuranceConsumptionEntities = Sets.newHashSet(e1, e2, e3, e4, e5);
        System.out.println();

    }
}
